package net.meblabs.commons.progress;

public class ComplexProgressImpl extends ProgressImpl implements ComplexProgress {

	private Progress subProgress;

	ComplexProgressImpl(Long id) {
		super(id);
		this.subProgress = new ProgressImpl(id);
	}

	@Override
	public ProgressState getSubProgressState() {
		return subProgress.getState();
	}

	@Override
	public void subProgressInitialize(String message) {
		subProgress.initialize(message);
	}

	@Override
	public void subProgressInitialize(int total, String message) {
		subProgress.initialize(total, message);
	}

	@Override
	public void setSubProgressTotal(int total) {
		subProgress.setTotal(total);
	}

	@Override
	public void subProgressAdvance(String message) {
		subProgress.advance(message);
	}

	@Override
	public void setSubProgressCompleted() {
		subProgress.setCompleted();
	}
}
